<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="共几页" prop="totalPage">
        <el-input
          v-model="queryParams.totalPage"
          placeholder="请输入共几页"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="第几页" prop="page">
        <el-input
          v-model="queryParams.page"
          placeholder="请输入第几页"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="检测单位名称" prop="jiancdwmc">
        <el-input
          v-model="queryParams.jiancdwmc"
          placeholder="请输入检测单位名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="记录编号" prop="jilbh">
        <el-input
          v-model="queryParams.jilbh"
          placeholder="请输入记录编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="工程名称" prop="gongcmc">
        <el-input
          v-model="queryParams.gongcmc"
          placeholder="请输入工程名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="工程部位/用途" prop="gongcbwyt">
        <el-input
          v-model="queryParams.gongcbwyt"
          placeholder="请输入工程部位/用途"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="样品名称" prop="yangpmc">
        <el-input
          v-model="queryParams.yangpmc"
          placeholder="请输入样品名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="样品编号" prop="yangpbh">
        <el-input
          v-model="queryParams.yangpbh"
          placeholder="请输入样品编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="样品数量" prop="yangpsl">
        <el-input
          v-model="queryParams.yangpsl"
          placeholder="请输入样品数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="样品状态" prop="yangpzt">
        <el-input
          v-model="queryParams.yangpzt"
          placeholder="请输入样品状态"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="样品时间" prop="yangpsj">
        <el-input
          v-model="queryParams.yangpsj"
          placeholder="请输入样品时间"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="试验检测日期" prop="shiyjcrq">
        <el-input
          v-model="queryParams.shiyjcrq"
          placeholder="请输入试验检测日期"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="试验条件温度" prop="shiytjwd">
        <el-input
          v-model="queryParams.shiytjwd"
          placeholder="请输入试验条件温度"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="试验条件湿度" prop="shiytjsd">
        <el-input
          v-model="queryParams.shiytjsd"
          placeholder="请输入试验条件湿度"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="检测依据" prop="jiancyj">
        <el-input
          v-model="queryParams.jiancyj"
          placeholder="请输入检测依据"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="判定依据" prop="pandyj">
        <el-input
          v-model="queryParams.pandyj"
          placeholder="请输入判定依据"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="主要仪器设备名称及编号" prop="zhuyyqsbmcjbh">
        <el-input
          v-model="queryParams.zhuyyqsbmcjbh"
          placeholder="请输入主要仪器设备名称及编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="公路等级" prop="gongldj">
        <el-input
          v-model="queryParams.gongldj"
          placeholder="请输入公路等级"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="目标可靠度(%)" prop="mubkkd">
        <el-input
          v-model="queryParams.mubkkd"
          placeholder="请输入目标可靠度(%)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="目标可靠指标" prop="mubkkzb">
        <el-input
          v-model="queryParams.mubkkzb"
          placeholder="请输入目标可靠指标"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="湿度影响系数" prop="shidyxxs">
        <el-input
          v-model="queryParams.shidyxxs"
          placeholder="请输入湿度影响系数"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="温度影响系数" prop="wendyxxs">
        <el-input
          v-model="queryParams.wendyxxs"
          placeholder="请输入温度影响系数"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="路段桩号" prop="ludzh">
        <el-input
          v-model="queryParams.ludzh"
          placeholder="请输入路段桩号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="弯沉仪类型" prop="wancylx">
        <el-input
          v-model="queryParams.wancylx"
          placeholder="请输入弯沉仪类型"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="后轴重(kN)" prop="houzz">
        <el-input
          v-model="queryParams.houzz"
          placeholder="请输入后轴重(kN)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="测试车车型" prop="cesccx">
        <el-input
          v-model="queryParams.cesccx"
          placeholder="请输入测试车车型"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="结构层类型" prop="jiegclx">
        <el-input
          v-model="queryParams.jiegclx"
          placeholder="请输入结构层类型"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="轮胎压强(MPa)" prop="luntyq">
        <el-input
          v-model="queryParams.luntyq"
          placeholder="请输入轮胎压强(MPa)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="舍弃系数" prop="sheqxs">
        <el-input
          v-model="queryParams.sheqxs"
          placeholder="请输入舍弃系数"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="沥青面层厚度(mm)" prop="liqmchd">
        <el-input
          v-model="queryParams.liqmchd"
          placeholder="请输入沥青面层厚度(mm)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="设计弯沉(0.01mm)" prop="shejwc">
        <el-input
          v-model="queryParams.shejwc"
          placeholder="请输入设计弯沉(0.01mm)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="前五天平均气温(°C)" prop="pingjwd">
        <el-input
          v-model="queryParams.pingjwd"
          placeholder="请输入前五天平均气温(°C)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="检验用弯沉仪最大读数(0.01mm)" prop="zuidds">
        <el-input
          v-model="queryParams.zuidds"
          placeholder="请输入检验用弯沉仪最大读数(0.01mm)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="检验用弯沉仪最终读数(0.01mm)" prop="zuizds">
        <el-input
          v-model="queryParams.zuizds"
          placeholder="请输入检验用弯沉仪最终读数(0.01mm)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="附加声明" prop="fujsm">
        <el-input
          v-model="queryParams.fujsm"
          placeholder="请输入附加声明"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="检测" prop="jianc">
        <el-input
          v-model="queryParams.jianc"
          placeholder="请输入检测"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="记录" prop="jil">
        <el-input
          v-model="queryParams.jil"
          placeholder="请输入记录"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="复核" prop="fuh">
        <el-input
          v-model="queryParams.fuh"
          placeholder="请输入复核"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="日期" prop="riq">
        <el-input
          v-model="queryParams.riq"
          placeholder="请输入日期"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="设备ids" prop="shebIds">
        <el-input
          v-model="queryParams.shebIds"
          placeholder="请输入设备ids"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="判断依据ids" prop="pandyjIds">
        <el-input
          v-model="queryParams.pandyjIds"
          placeholder="请输入判断依据ids"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="检测依据ids" prop="jiancyjIds">
        <el-input
          v-model="queryParams.jiancyjIds"
          placeholder="请输入检测依据ids"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['report_ljlm:wcjlbBsInfo:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['report_ljlm:wcjlbBsInfo:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['report_ljlm:wcjlbBsInfo:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['report_ljlm:wcjlbBsInfo:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="wcjlbBsInfoList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="一份excel表格的唯一id(其他的excel主表，都应有此字段）" align="center" prop="excelId" v-if="true"/>
      <el-table-column label="共几页" align="center" prop="totalPage" />
      <el-table-column label="第几页" align="center" prop="page" />
      <el-table-column label="检测单位名称" align="center" prop="jiancdwmc" />
      <el-table-column label="记录编号" align="center" prop="jilbh" />
      <el-table-column label="工程名称" align="center" prop="gongcmc" />
      <el-table-column label="工程部位/用途" align="center" prop="gongcbwyt" />
      <el-table-column label="样品名称" align="center" prop="yangpmc" />
      <el-table-column label="样品编号" align="center" prop="yangpbh" />
      <el-table-column label="样品数量" align="center" prop="yangpsl" />
      <el-table-column label="样品状态" align="center" prop="yangpzt" />
      <el-table-column label="样品时间" align="center" prop="yangpsj" />
      <el-table-column label="试验检测日期" align="center" prop="shiyjcrq" />
      <el-table-column label="试验条件温度" align="center" prop="shiytjwd" />
      <el-table-column label="试验条件湿度" align="center" prop="shiytjsd" />
      <el-table-column label="检测依据" align="center" prop="jiancyj" />
      <el-table-column label="判定依据" align="center" prop="pandyj" />
      <el-table-column label="主要仪器设备名称及编号" align="center" prop="zhuyyqsbmcjbh" />
      <el-table-column label="公路等级" align="center" prop="gongldj" />
      <el-table-column label="目标可靠度(%)" align="center" prop="mubkkd" />
      <el-table-column label="目标可靠指标" align="center" prop="mubkkzb" />
      <el-table-column label="湿度影响系数" align="center" prop="shidyxxs" />
      <el-table-column label="温度影响系数" align="center" prop="wendyxxs" />
      <el-table-column label="路段桩号" align="center" prop="ludzh" />
      <el-table-column label="弯沉仪类型" align="center" prop="wancylx" />
      <el-table-column label="后轴重(kN)" align="center" prop="houzz" />
      <el-table-column label="测试车车型" align="center" prop="cesccx" />
      <el-table-column label="结构层类型" align="center" prop="jiegclx" />
      <el-table-column label="轮胎压强(MPa)" align="center" prop="luntyq" />
      <el-table-column label="舍弃系数" align="center" prop="sheqxs" />
      <el-table-column label="沥青面层厚度(mm)" align="center" prop="liqmchd" />
      <el-table-column label="设计弯沉(0.01mm)" align="center" prop="shejwc" />
      <el-table-column label="前五天平均气温(°C)" align="center" prop="pingjwd" />
      <el-table-column label="检验用弯沉仪最大读数(0.01mm)" align="center" prop="zuidds" />
      <el-table-column label="检验用弯沉仪最终读数(0.01mm)" align="center" prop="zuizds" />
      <el-table-column label="附加声明" align="center" prop="fujsm" />
      <el-table-column label="检测" align="center" prop="jianc" />
      <el-table-column label="记录" align="center" prop="jil" />
      <el-table-column label="复核" align="center" prop="fuh" />
      <el-table-column label="日期" align="center" prop="riq" />
      <el-table-column label="设备ids" align="center" prop="shebIds" />
      <el-table-column label="判断依据ids" align="center" prop="pandyjIds" />
      <el-table-column label="检测依据ids" align="center" prop="jiancyjIds" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['report_ljlm:wcjlbBsInfo:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['report_ljlm:wcjlbBsInfo:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改贝克曼梁测定回弹弯沉试验检测记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="共几页" prop="totalPage">
          <el-input v-model="form.totalPage" placeholder="请输入共几页" />
        </el-form-item>
        <el-form-item label="第几页" prop="page">
          <el-input v-model="form.page" placeholder="请输入第几页" />
        </el-form-item>
        <el-form-item label="检测单位名称" prop="jiancdwmc">
          <el-input v-model="form.jiancdwmc" placeholder="请输入检测单位名称" />
        </el-form-item>
        <el-form-item label="记录编号" prop="jilbh">
          <el-input v-model="form.jilbh" placeholder="请输入记录编号" />
        </el-form-item>
        <el-form-item label="工程名称" prop="gongcmc">
          <el-input v-model="form.gongcmc" placeholder="请输入工程名称" />
        </el-form-item>
        <el-form-item label="工程部位/用途" prop="gongcbwyt">
          <el-input v-model="form.gongcbwyt" placeholder="请输入工程部位/用途" />
        </el-form-item>
        <el-form-item label="样品名称" prop="yangpmc">
          <el-input v-model="form.yangpmc" placeholder="请输入样品名称" />
        </el-form-item>
        <el-form-item label="样品编号" prop="yangpbh">
          <el-input v-model="form.yangpbh" placeholder="请输入样品编号" />
        </el-form-item>
        <el-form-item label="样品数量" prop="yangpsl">
          <el-input v-model="form.yangpsl" placeholder="请输入样品数量" />
        </el-form-item>
        <el-form-item label="样品状态" prop="yangpzt">
          <el-input v-model="form.yangpzt" placeholder="请输入样品状态" />
        </el-form-item>
        <el-form-item label="样品时间" prop="yangpsj">
          <el-input v-model="form.yangpsj" placeholder="请输入样品时间" />
        </el-form-item>
        <el-form-item label="试验检测日期" prop="shiyjcrq">
          <el-input v-model="form.shiyjcrq" placeholder="请输入试验检测日期" />
        </el-form-item>
        <el-form-item label="试验条件温度" prop="shiytjwd">
          <el-input v-model="form.shiytjwd" placeholder="请输入试验条件温度" />
        </el-form-item>
        <el-form-item label="试验条件湿度" prop="shiytjsd">
          <el-input v-model="form.shiytjsd" placeholder="请输入试验条件湿度" />
        </el-form-item>
        <el-form-item label="检测依据" prop="jiancyj">
          <el-input v-model="form.jiancyj" placeholder="请输入检测依据" />
        </el-form-item>
        <el-form-item label="判定依据" prop="pandyj">
          <el-input v-model="form.pandyj" placeholder="请输入判定依据" />
        </el-form-item>
        <el-form-item label="主要仪器设备名称及编号" prop="zhuyyqsbmcjbh">
          <el-input v-model="form.zhuyyqsbmcjbh" placeholder="请输入主要仪器设备名称及编号" />
        </el-form-item>
        <el-form-item label="公路等级" prop="gongldj">
          <el-input v-model="form.gongldj" placeholder="请输入公路等级" />
        </el-form-item>
        <el-form-item label="目标可靠度(%)" prop="mubkkd">
          <el-input v-model="form.mubkkd" placeholder="请输入目标可靠度(%)" />
        </el-form-item>
        <el-form-item label="目标可靠指标" prop="mubkkzb">
          <el-input v-model="form.mubkkzb" placeholder="请输入目标可靠指标" />
        </el-form-item>
        <el-form-item label="湿度影响系数" prop="shidyxxs">
          <el-input v-model="form.shidyxxs" placeholder="请输入湿度影响系数" />
        </el-form-item>
        <el-form-item label="温度影响系数" prop="wendyxxs">
          <el-input v-model="form.wendyxxs" placeholder="请输入温度影响系数" />
        </el-form-item>
        <el-form-item label="路段桩号" prop="ludzh">
          <el-input v-model="form.ludzh" placeholder="请输入路段桩号" />
        </el-form-item>
        <el-form-item label="弯沉仪类型" prop="wancylx">
          <el-input v-model="form.wancylx" placeholder="请输入弯沉仪类型" />
        </el-form-item>
        <el-form-item label="后轴重(kN)" prop="houzz">
          <el-input v-model="form.houzz" placeholder="请输入后轴重(kN)" />
        </el-form-item>
        <el-form-item label="测试车车型" prop="cesccx">
          <el-input v-model="form.cesccx" placeholder="请输入测试车车型" />
        </el-form-item>
        <el-form-item label="结构层类型" prop="jiegclx">
          <el-input v-model="form.jiegclx" placeholder="请输入结构层类型" />
        </el-form-item>
        <el-form-item label="轮胎压强(MPa)" prop="luntyq">
          <el-input v-model="form.luntyq" placeholder="请输入轮胎压强(MPa)" />
        </el-form-item>
        <el-form-item label="舍弃系数" prop="sheqxs">
          <el-input v-model="form.sheqxs" placeholder="请输入舍弃系数" />
        </el-form-item>
        <el-form-item label="沥青面层厚度(mm)" prop="liqmchd">
          <el-input v-model="form.liqmchd" placeholder="请输入沥青面层厚度(mm)" />
        </el-form-item>
        <el-form-item label="设计弯沉(0.01mm)" prop="shejwc">
          <el-input v-model="form.shejwc" placeholder="请输入设计弯沉(0.01mm)" />
        </el-form-item>
        <el-form-item label="前五天平均气温(°C)" prop="pingjwd">
          <el-input v-model="form.pingjwd" placeholder="请输入前五天平均气温(°C)" />
        </el-form-item>
        <el-form-item label="检验用弯沉仪最大读数(0.01mm)" prop="zuidds">
          <el-input v-model="form.zuidds" placeholder="请输入检验用弯沉仪最大读数(0.01mm)" />
        </el-form-item>
        <el-form-item label="检验用弯沉仪最终读数(0.01mm)" prop="zuizds">
          <el-input v-model="form.zuizds" placeholder="请输入检验用弯沉仪最终读数(0.01mm)" />
        </el-form-item>
        <el-form-item label="附加声明" prop="fujsm">
          <el-input v-model="form.fujsm" placeholder="请输入附加声明" />
        </el-form-item>
        <el-form-item label="检测" prop="jianc">
          <el-input v-model="form.jianc" placeholder="请输入检测" />
        </el-form-item>
        <el-form-item label="记录" prop="jil">
          <el-input v-model="form.jil" placeholder="请输入记录" />
        </el-form-item>
        <el-form-item label="复核" prop="fuh">
          <el-input v-model="form.fuh" placeholder="请输入复核" />
        </el-form-item>
        <el-form-item label="日期" prop="riq">
          <el-input v-model="form.riq" placeholder="请输入日期" />
        </el-form-item>
        <el-form-item label="设备ids" prop="shebIds">
          <el-input v-model="form.shebIds" placeholder="请输入设备ids" />
        </el-form-item>
        <el-form-item label="判断依据ids" prop="pandyjIds">
          <el-input v-model="form.pandyjIds" placeholder="请输入判断依据ids" />
        </el-form-item>
        <el-form-item label="检测依据ids" prop="jiancyjIds">
          <el-input v-model="form.jiancyjIds" placeholder="请输入检测依据ids" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listWcjlbBsInfo, getWcjlbBsInfo, delWcjlbBsInfo, addWcjlbBsInfo, updateWcjlbBsInfo } from "@/api/report_ljlm/wcjlbBsInfo";

export default {
  name: "WcjlbBsInfo",
  data() {
    return {
      // 按钮loading
      buttonLoading: false,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 贝克曼梁测定回弹弯沉试验检测记录表格数据
      wcjlbBsInfoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        totalPage: undefined,
        page: undefined,
        jiancdwmc: undefined,
        jilbh: undefined,
        gongcmc: undefined,
        gongcbwyt: undefined,
        yangpmc: undefined,
        yangpbh: undefined,
        yangpsl: undefined,
        yangpzt: undefined,
        yangpsj: undefined,
        shiyjcrq: undefined,
        shiytjwd: undefined,
        shiytjsd: undefined,
        jiancyj: undefined,
        pandyj: undefined,
        zhuyyqsbmcjbh: undefined,
        gongldj: undefined,
        mubkkd: undefined,
        mubkkzb: undefined,
        shidyxxs: undefined,
        wendyxxs: undefined,
        ludzh: undefined,
        wancylx: undefined,
        houzz: undefined,
        cesccx: undefined,
        jiegclx: undefined,
        luntyq: undefined,
        sheqxs: undefined,
        liqmchd: undefined,
        shejwc: undefined,
        pingjwd: undefined,
        zuidds: undefined,
        zuizds: undefined,
        fujsm: undefined,
        jianc: undefined,
        jil: undefined,
        fuh: undefined,
        riq: undefined,
        shebIds: undefined,
        pandyjIds: undefined,
        jiancyjIds: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        excelId: [
          { required: true, message: "一份excel表格的唯一id(其他的excel主表，都应有此字段）不能为空", trigger: "blur" }
        ],
        totalPage: [
          { required: true, message: "共几页不能为空", trigger: "blur" }
        ],
        page: [
          { required: true, message: "第几页不能为空", trigger: "blur" }
        ],
        jiancdwmc: [
          { required: true, message: "检测单位名称不能为空", trigger: "blur" }
        ],
        jilbh: [
          { required: true, message: "记录编号不能为空", trigger: "blur" }
        ],
        gongcmc: [
          { required: true, message: "工程名称不能为空", trigger: "blur" }
        ],
        gongcbwyt: [
          { required: true, message: "工程部位/用途不能为空", trigger: "blur" }
        ],
        yangpmc: [
          { required: true, message: "样品名称不能为空", trigger: "blur" }
        ],
        yangpbh: [
          { required: true, message: "样品编号不能为空", trigger: "blur" }
        ],
        yangpsl: [
          { required: true, message: "样品数量不能为空", trigger: "blur" }
        ],
        yangpzt: [
          { required: true, message: "样品状态不能为空", trigger: "blur" }
        ],
        yangpsj: [
          { required: true, message: "样品时间不能为空", trigger: "blur" }
        ],
        shiyjcrq: [
          { required: true, message: "试验检测日期不能为空", trigger: "blur" }
        ],
        shiytjwd: [
          { required: true, message: "试验条件温度不能为空", trigger: "blur" }
        ],
        shiytjsd: [
          { required: true, message: "试验条件湿度不能为空", trigger: "blur" }
        ],
        jiancyj: [
          { required: true, message: "检测依据不能为空", trigger: "blur" }
        ],
        pandyj: [
          { required: true, message: "判定依据不能为空", trigger: "blur" }
        ],
        zhuyyqsbmcjbh: [
          { required: true, message: "主要仪器设备名称及编号不能为空", trigger: "blur" }
        ],
        gongldj: [
          { required: true, message: "公路等级不能为空", trigger: "blur" }
        ],
        mubkkd: [
          { required: true, message: "目标可靠度(%)不能为空", trigger: "blur" }
        ],
        mubkkzb: [
          { required: true, message: "目标可靠指标不能为空", trigger: "blur" }
        ],
        shidyxxs: [
          { required: true, message: "湿度影响系数不能为空", trigger: "blur" }
        ],
        wendyxxs: [
          { required: true, message: "温度影响系数不能为空", trigger: "blur" }
        ],
        ludzh: [
          { required: true, message: "路段桩号不能为空", trigger: "blur" }
        ],
        wancylx: [
          { required: true, message: "弯沉仪类型不能为空", trigger: "blur" }
        ],
        houzz: [
          { required: true, message: "后轴重(kN)不能为空", trigger: "blur" }
        ],
        cesccx: [
          { required: true, message: "测试车车型不能为空", trigger: "blur" }
        ],
        jiegclx: [
          { required: true, message: "结构层类型不能为空", trigger: "blur" }
        ],
        luntyq: [
          { required: true, message: "轮胎压强(MPa)不能为空", trigger: "blur" }
        ],
        sheqxs: [
          { required: true, message: "舍弃系数不能为空", trigger: "blur" }
        ],
        liqmchd: [
          { required: true, message: "沥青面层厚度(mm)不能为空", trigger: "blur" }
        ],
        shejwc: [
          { required: true, message: "设计弯沉(0.01mm)不能为空", trigger: "blur" }
        ],
        pingjwd: [
          { required: true, message: "前五天平均气温(°C)不能为空", trigger: "blur" }
        ],
        zuidds: [
          { required: true, message: "检验用弯沉仪最大读数(0.01mm)不能为空", trigger: "blur" }
        ],
        zuizds: [
          { required: true, message: "检验用弯沉仪最终读数(0.01mm)不能为空", trigger: "blur" }
        ],
        fujsm: [
          { required: true, message: "附加声明不能为空", trigger: "blur" }
        ],
        jianc: [
          { required: true, message: "检测不能为空", trigger: "blur" }
        ],
        jil: [
          { required: true, message: "记录不能为空", trigger: "blur" }
        ],
        fuh: [
          { required: true, message: "复核不能为空", trigger: "blur" }
        ],
        riq: [
          { required: true, message: "日期不能为空", trigger: "blur" }
        ],
        shebIds: [
          { required: true, message: "设备ids不能为空", trigger: "blur" }
        ],
        pandyjIds: [
          { required: true, message: "判断依据ids不能为空", trigger: "blur" }
        ],
        jiancyjIds: [
          { required: true, message: "检测依据ids不能为空", trigger: "blur" }
        ]
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询贝克曼梁测定回弹弯沉试验检测记录列表 */
    getList() {
      this.loading = true;
      listWcjlbBsInfo(this.queryParams).then(response => {
        this.wcjlbBsInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        excelId: undefined,
        totalPage: undefined,
        page: undefined,
        jiancdwmc: undefined,
        jilbh: undefined,
        gongcmc: undefined,
        gongcbwyt: undefined,
        yangpmc: undefined,
        yangpbh: undefined,
        yangpsl: undefined,
        yangpzt: undefined,
        yangpsj: undefined,
        shiyjcrq: undefined,
        shiytjwd: undefined,
        shiytjsd: undefined,
        jiancyj: undefined,
        pandyj: undefined,
        zhuyyqsbmcjbh: undefined,
        gongldj: undefined,
        mubkkd: undefined,
        mubkkzb: undefined,
        shidyxxs: undefined,
        wendyxxs: undefined,
        ludzh: undefined,
        wancylx: undefined,
        houzz: undefined,
        cesccx: undefined,
        jiegclx: undefined,
        luntyq: undefined,
        sheqxs: undefined,
        liqmchd: undefined,
        shejwc: undefined,
        pingjwd: undefined,
        zuidds: undefined,
        zuizds: undefined,
        fujsm: undefined,
        jianc: undefined,
        jil: undefined,
        fuh: undefined,
        riq: undefined,
        delFlag: undefined,
        createBy: undefined,
        createTime: undefined,
        updateBy: undefined,
        updateTime: undefined,
        shebIds: undefined,
        pandyjIds: undefined,
        jiancyjIds: undefined
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.excelId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加贝克曼梁测定回弹弯沉试验检测记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.loading = true;
      this.reset();
      const excelId = row.excelId || this.ids
      getWcjlbBsInfo(excelId).then(response => {
        this.loading = false;
        this.form = response.data;
        this.open = true;
        this.title = "修改贝克曼梁测定回弹弯沉试验检测记录";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.buttonLoading = true;
          if (this.form.excelId != null) {
            updateWcjlbBsInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          } else {
            addWcjlbBsInfo(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const excelIds = row.excelId || this.ids;
      this.$modal.confirm('是否确认删除贝克曼梁测定回弹弯沉试验检测记录编号为"' + excelIds + '"的数据项？').then(() => {
        this.loading = true;
        return delWcjlbBsInfo(excelIds);
      }).then(() => {
        this.loading = false;
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {
      }).finally(() => {
        this.loading = false;
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('report_ljlm/wcjlbBsInfo/export', {
        ...this.queryParams
      }, `wcjlbBsInfo_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
